﻿#pragma once
#ifndef XL_XEXPAND_NETWORK_WINHTTP_HAPER_H
#define XL_XEXPAND_NETWORK_WINHTTP_HAPER_H

#if XC_MOUDLE
#include "module_base.h"
#endif

CXText lTrim(CXText& str);
CXText rTrim(CXText& str);
CXText Trim(CXText& str);
DWORD rFind(CXText& str, const wchar_t* _Ptr, size_t _Off = std::string::npos);

std::vector<CXText> split(CXText s, wchar_t c = ' ');

void w_toupper(CXText& wstr);

void w_tolower(CXText& wstr);

bool InternetSetCookieW(
    _In_ LPCWSTR lpszUrl,
    _In_opt_ LPCWSTR lpszCookieName,
    _In_ LPCWSTR lpszCookieData);

bool InternetGetCookieW(
    _In_ LPCWSTR lpszUrl,
    _In_opt_ LPCWSTR lpszCookieName,
    _Out_writes_opt_(*lpdwSize) LPWSTR lpszCookieData,
    _Inout_ LPDWORD lpdwSize);

CXTextA W_Coding_Utf82Gbk(CXTextA& utf8);

#endif